package com.jiazhong.cloud.gateway.example.auth.controller;

import com.jiazhong.cloud.commons.bean.Student;
import com.jiazhong.cloud.commons.util.JsonResult;
import com.jiazhong.cloud.gateway.example.auth.service.StudentService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auth")
public class AuthController {
    @Resource
    private StudentService studentService;

    @PostMapping
    public JsonResult login(Student student) {
        return studentService.login(student);
    }
}
